<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>上下居中</title>
<style>
div{
    width: 300px;
    height: 300px;
    border: 3px solid #555;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}
img{
    vertical-align: middle;
}
</style>
</head>
<body>
	<div>
		<img src="https://sf3-scmcdn2-tos.pstatp.com/xitu_juejin_web/img/logo.a7995ad.svg">
	</div>
</body>
</html>